Optimal. Leaf size=244 \[ \frac {\left (8 a^4+36 a^2 b^2+5 b^4\right ) \tanh ^{-1}(\sin (c+d x))}{16 d}-\frac {a \left (4 a^4-121 a^2 b^2-128 b^4\right ) \tan (c+d x)}{60 b d}-\frac {\left (8 a^4-178 a^2 b^2-75 b^4\right ) \sec (c+d x) \tan (c+d x)}{240 d}-\frac {a \left (4 a^2-53 b^2\right ) (a+b \sec (c+d x))^2 \tan (c+d x)}{120 b d}-\frac {\left (4 a^2-25 b^2\right ) (a+b \sec (c+d x))^3 \tan (c+d x)}{120 b d}-\frac {a (a+b \sec (c+d x))^4 \tan (c+d x)}{30 b d}+\frac {(a+b \sec (c+d x))^5 \tan (c+d x)}{6 b d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.32, antiderivative size = 244, normalized size of antiderivative = 1.00, number of steps
used = 9, number of rules used = 7, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.333, Rules used = {3925, 4087,
4082, 3872, 3855, 3852, 8} \begin {gather*} -\frac {\left (4 a^2-25 b^2\right ) \tan (c+d x) (a+b \sec (c+d x))^3}{120 b d}-\frac {a \left (4 a^2-53 b^2\right ) \tan (c+d x) (a+b \sec (c+d x))^2}{120 b d}-\frac {a \left (4 a^4-121 a^2 b^2-128 b^4\right ) \tan (c+d x)}{60 b d}+\frac {\left (8 a^4+36 a^2 b^2+5 b^4\right ) \tanh ^{-1}(\sin (c+d x))}{16 d}-\frac {\left (8 a^4-178 a^2 b^2-75 b^4\right ) \tan (c+d x) \sec (c+d x)}{240 d}+\frac {\tan (c+d x) (a+b \sec (c+d x))^5}{6 b d}-\frac {a \tan (c+d x) (a+b \sec (c+d x))^4}{30 b d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 3852
Rule 3855
Rule 3872
Rule 3925
Rule 4082
Rule 4087
Rubi steps
\begin {align*} \int \sec ^3(c+d x) (a+b \sec (c+d x))^4 \, dx &=\frac {(a+b \sec (c+d x))^5 \tan (c+d x)}{6 b d}+\frac {\int \sec (c+d x) (5 b-a \sec (c+d x)) (a+b \sec (c+d x))^4 \, dx}{6 b}\\ &=-\frac {a (a+b \sec (c+d x))^4 \tan (c+d x)}{30 b d}+\frac {(a+b \sec (c+d x))^5 \tan (c+d x)}{6 b d}+\frac {\int \sec (c+d x) (a+b \sec (c+d x))^3 \left (21 a b-\left (4 a^2-25 b^2\right ) \sec (c+d x)\right ) \, dx}{30 b}\\ &=-\frac {\left (4 a^2-25 b^2\right ) (a+b \sec (c+d x))^3 \tan (c+d x)}{120 b d}-\frac {a (a+b \sec (c+d x))^4 \tan (c+d x)}{30 b d}+\frac {(a+b \sec (c+d x))^5 \tan (c+d x)}{6 b d}+\frac {\int \sec (c+d x) (a+b \sec (c+d x))^2 \left (3 b \left (24 a^2+25 b^2\right )-3 a \left (4 a^2-53 b^2\right ) \sec (c+d x)\right ) \, dx}{120 b}\\ &=-\frac {a \left (4 a^2-53 b^2\right ) (a+b \sec (c+d x))^2 \tan (c+d x)}{120 b d}-\frac {\left (4 a^2-25 b^2\right ) (a+b \sec (c+d x))^3 \tan (c+d x)}{120 b d}-\frac {a (a+b \sec (c+d x))^4 \tan (c+d x)}{30 b d}+\frac {(a+b \sec (c+d x))^5 \tan (c+d x)}{6 b d}+\frac {\int \sec (c+d x) (a+b \sec (c+d x)) \left (3 a b \left (64 a^2+181 b^2\right )-3 \left (8 a^4-178 a^2 b^2-75 b^4\right ) \sec (c+d x)\right ) \, dx}{360 b}\\ &=-\frac {\left (8 a^4-178 a^2 b^2-75 b^4\right ) \sec (c+d x) \tan (c+d x)}{240 d}-\frac {a \left (4 a^2-53 b^2\right ) (a+b \sec (c+d x))^2 \tan (c+d x)}{120 b d}-\frac {\left (4 a^2-25 b^2\right ) (a+b \sec (c+d x))^3 \tan (c+d x)}{120 b d}-\frac {a (a+b \sec (c+d x))^4 \tan (c+d x)}{30 b d}+\frac {(a+b \sec (c+d x))^5 \tan (c+d x)}{6 b d}+\frac {\int \sec (c+d x) \left (45 b \left (8 a^4+36 a^2 b^2+5 b^4\right )-12 a \left (4 a^4-121 a^2 b^2-128 b^4\right ) \sec (c+d x)\right ) \, dx}{720 b}\\ &=-\frac {\left (8 a^4-178 a^2 b^2-75 b^4\right ) \sec (c+d x) \tan (c+d x)}{240 d}-\frac {a \left (4 a^2-53 b^2\right ) (a+b \sec (c+d x))^2 \tan (c+d x)}{120 b d}-\frac {\left (4 a^2-25 b^2\right ) (a+b \sec (c+d x))^3 \tan (c+d x)}{120 b d}-\frac {a (a+b \sec (c+d x))^4 \tan (c+d x)}{30 b d}+\frac {(a+b \sec (c+d x))^5 \tan (c+d x)}{6 b d}-\frac {\left (a \left (4 a^4-121 a^2 b^2-128 b^4\right )\right ) \int \sec ^2(c+d x) \, dx}{60 b}+\frac {1}{16} \left (8 a^4+36 a^2 b^2+5 b^4\right ) \int \sec (c+d x) \, dx\\ &=\frac {\left (8 a^4+36 a^2 b^2+5 b^4\right ) \tanh ^{-1}(\sin (c+d x))}{16 d}-\frac {\left (8 a^4-178 a^2 b^2-75 b^4\right ) \sec (c+d x) \tan (c+d x)}{240 d}-\frac {a \left (4 a^2-53 b^2\right ) (a+b \sec (c+d x))^2 \tan (c+d x)}{120 b d}-\frac {\left (4 a^2-25 b^2\right ) (a+b \sec (c+d x))^3 \tan (c+d x)}{120 b d}-\frac {a (a+b \sec (c+d x))^4 \tan (c+d x)}{30 b d}+\frac {(a+b \sec (c+d x))^5 \tan (c+d x)}{6 b d}+\frac {\left (a \left (4 a^4-121 a^2 b^2-128 b^4\right )\right ) \text {Subst}(\int 1 \, dx,x,-\tan (c+d x))}{60 b d}\\ &=\frac {\left (8 a^4+36 a^2 b^2+5 b^4\right ) \tanh ^{-1}(\sin (c+d x))}{16 d}-\frac {a \left (4 a^4-121 a^2 b^2-128 b^4\right ) \tan (c+d x)}{60 b d}-\frac {\left (8 a^4-178 a^2 b^2-75 b^4\right ) \sec (c+d x) \tan (c+d x)}{240 d}-\frac {a \left (4 a^2-53 b^2\right ) (a+b \sec (c+d x))^2 \tan (c+d x)}{120 b d}-\frac {\left (4 a^2-25 b^2\right ) (a+b \sec (c+d x))^3 \tan (c+d x)}{120 b d}-\frac {a (a+b \sec (c+d x))^4 \tan (c+d x)}{30 b d}+\frac {(a+b \sec (c+d x))^5 \tan (c+d x)}{6 b d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 1.01, size = 154, normalized size = 0.63 \begin {gather*} \frac {15 \left (8 a^4+36 a^2 b^2+5 b^4\right ) \tanh ^{-1}(\sin (c+d x))+\tan (c+d x) \left (15 \left (8 a^4+36 a^2 b^2+5 b^4\right ) \sec (c+d x)+10 b^2 \left (36 a^2+5 b^2\right ) \sec ^3(c+d x)+40 b^4 \sec ^5(c+d x)+64 a b \left (15 \left (a^2+b^2\right )+5 \left (a^2+2 b^2\right ) \tan ^2(c+d x)+3 b^2 \tan ^4(c+d x)\right )\right )}{240 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.13, size = 209, normalized size = 0.86 Too large to display
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.27, size = 275, normalized size = 1.13 \begin {gather*} \frac {640 \, {\left (\tan \left (d x + c\right )^{3} + 3 \, \tan \left (d x + c\right )\right )} a^{3} b + 128 \, {\left (3 \, \tan \left (d x + c\right )^{5} + 10 \, \tan \left (d x + c\right )^{3} + 15 \, \tan \left (d x + c\right )\right )} a b^{3} - 5 \, b^{4} {\left (\frac {2 \, {\left (15 \, \sin \left (d x + c\right )^{5} - 40 \, \sin \left (d x + c\right )^{3} + 33 \, \sin \left (d x + c\right )\right )}}{\sin \left (d x + c\right )^{6} - 3 \, \sin \left (d x + c\right )^{4} + 3 \, \sin \left (d x + c\right )^{2} - 1} - 15 \, \log \left (\sin \left (d x + c\right ) + 1\right ) + 15 \, \log \left (\sin \left (d x + c\right ) - 1\right )\right )} - 180 \, a^{2} b^{2} {\left (\frac {2 \, {\left (3 \, \sin \left (d x + c\right )^{3} - 5 \, \sin \left (d x + c\right )\right )}}{\sin \left (d x + c\right )^{4} - 2 \, \sin \left (d x + c\right )^{2} + 1} - 3 \, \log \left (\sin \left (d x + c\right ) + 1\right ) + 3 \, \log \left (\sin \left (d x + c\right ) - 1\right )\right )} - 120 \, a^{4} {\left (\frac {2 \, \sin \left (d x + c\right )}{\sin \left (d x + c\right )^{2} - 1} - \log \left (\sin \left (d x + c\right ) + 1\right ) + \log \left (\sin \left (d x + c\right ) - 1\right )\right )}}{480 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 2.32, size = 217, normalized size = 0.89 \begin {gather*} \frac {15 \, {\left (8 \, a^{4} + 36 \, a^{2} b^{2} + 5 \, b^{4}\right )} \cos \left (d x + c\right )^{6} \log \left (\sin \left (d x + c\right ) + 1\right ) - 15 \, {\left (8 \, a^{4} + 36 \, a^{2} b^{2} + 5 \, b^{4}\right )} \cos \left (d x + c\right )^{6} \log \left (-\sin \left (d x + c\right ) + 1\right ) + 2 \, {\left (128 \, {\left (5 \, a^{3} b + 4 \, a b^{3}\right )} \cos \left (d x + c\right )^{5} + 192 \, a b^{3} \cos \left (d x + c\right ) + 15 \, {\left (8 \, a^{4} + 36 \, a^{2} b^{2} + 5 \, b^{4}\right )} \cos \left (d x + c\right )^{4} + 40 \, b^{4} + 64 \, {\left (5 \, a^{3} b + 4 \, a b^{3}\right )} \cos \left (d x + c\right )^{3} + 10 \, {\left (36 \, a^{2} b^{2} + 5 \, b^{4}\right )} \cos \left (d x + c\right )^{2}\right )} \sin \left (d x + c\right )}{480 \, d \cos \left (d x + c\right )^{6}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \left (a + b \sec {\left (c + d x \right )}\right )^{4} \sec ^{3}{\left (c + d x \right )}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 592 vs.
\(2 (230) = 460\).
time = 0.53, size = 592, normalized size = 2.43 \begin {gather*} \frac {15 \, {\left (8 \, a^{4} + 36 \, a^{2} b^{2} + 5 \, b^{4}\right )} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1 \right |}\right ) - 15 \, {\left (8 \, a^{4} + 36 \, a^{2} b^{2} + 5 \, b^{4}\right )} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1 \right |}\right ) + \frac {2 \, {\left (120 \, a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{11} - 960 \, a^{3} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{11} + 900 \, a^{2} b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{11} - 960 \, a b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{11} + 165 \, b^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{11} - 360 \, a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{9} + 3520 \, a^{3} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{9} - 1260 \, a^{2} b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{9} + 2240 \, a b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{9} + 25 \, b^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{9} + 240 \, a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} - 5760 \, a^{3} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} + 360 \, a^{2} b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} - 4992 \, a b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} + 450 \, b^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} + 240 \, a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 5760 \, a^{3} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 360 \, a^{2} b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 4992 \, a b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 450 \, b^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 360 \, a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 3520 \, a^{3} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 1260 \, a^{2} b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 2240 \, a b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 25 \, b^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 120 \, a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 960 \, a^{3} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 900 \, a^{2} b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 960 \, a b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 165 \, b^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1\right )}^{6}}}{240 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 4.88, size = 370, normalized size = 1.52 \begin {gather*} \frac {\mathrm {atanh}\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )\,\left (a^4+\frac {9\,a^2\,b^2}{2}+\frac {5\,b^4}{8}\right )}{d}+\frac {\left (a^4-8\,a^3\,b+\frac {15\,a^2\,b^2}{2}-8\,a\,b^3+\frac {11\,b^4}{8}\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{11}+\left (-3\,a^4+\frac {88\,a^3\,b}{3}-\frac {21\,a^2\,b^2}{2}+\frac {56\,a\,b^3}{3}+\frac {5\,b^4}{24}\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^9+\left (2\,a^4-48\,a^3\,b+3\,a^2\,b^2-\frac {208\,a\,b^3}{5}+\frac {15\,b^4}{4}\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7+\left (2\,a^4+48\,a^3\,b+3\,a^2\,b^2+\frac {208\,a\,b^3}{5}+\frac {15\,b^4}{4}\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5+\left (-3\,a^4-\frac {88\,a^3\,b}{3}-\frac {21\,a^2\,b^2}{2}-\frac {56\,a\,b^3}{3}+\frac {5\,b^4}{24}\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3+\left (a^4+8\,a^3\,b+\frac {15\,a^2\,b^2}{2}+8\,a\,b^3+\frac {11\,b^4}{8}\right )\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{d\,\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{12}-6\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{10}+15\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8-20\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6+15\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4-6\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________